package com.easylinkin.linkappapi.machinery.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Transient;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 塔吊防碰撞记录
 * </p>
 *
 * @author Xiaoyang
 * @since 2022-11-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("app_tower_crane_collision_alarm_record")
public class TowerCraneCollisionAlarmRecord extends Model<TowerCraneCollisionAlarmRecord> {

  private static final long serialVersionUID = 1L;

  /**
   * id
   */
  @TableId(value = "id", type = IdType.AUTO)
  private Long id;

  /**
   * 电子档案id
   */
  @TableField("machinery_id")
  private Integer machineryId;

  /**
   * 设备id
   */
  @TableField("device_code")
  private String deviceCode;

  /**
   * 租户id
   */
  @TableField("tenant_id_")
  private String tenantId;

  /**
   * 吊钩高度 单位m
   */
  @TableField("height")
  private Double height;

  /**
   * 回转幅度 单位m
   */
  @TableField("range_")
  private Double range;

  /**
   * 回转 单位°
   */
  @TableField("rotation")
  private Double rotation;

  /**
   * 塔臂高 单位m
   */
  @TableField("crane_arm_height")
  private Double craneArmHeight;

  /**
   * 前臂长 单位m
   */
  @TableField("crane_fore_arm_length")
  private Double craneForeArmLength;

  /**
   * 后臂长 单位m
   */
  @TableField("crane_rear_arm_length")
  private Double craneRearArmLength;

  /**
   * 司机姓名
   */
  @TableField("driver_name1")
  private String driverName1;

  /**
   * 创建时间
   */
  @TableField("create_time")
  private Date createTime;

  /**
   * 碰撞关联记录id
   */
  @TableField("ref_record_id")
  private Long refRecordId;

  /**
   * 塔吊名称
   */
  @Transient
  private String machineryName;


  @Override
  protected Serializable pkVal() {
    return this.id;
  }

}
